package cn.ccenjie.wsy.social.alipay.config;

import cn.ccenjie.wsy.social.SocialAutoConfigurerAdapter;
import cn.ccenjie.wsy.social.alipay.connet.AlipayConnectionFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.social.connect.ConnectionFactory;

@Configuration
public class AlipayAutoConfig extends SocialAutoConfigurerAdapter {

    private static final String APPID = "2018030602328428";
    private static final String SECRET_KEY = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCGw2XPCMFtS34IHDEV3U80Gmb3rf4BO27YGRrn/oo9MsorPXUJ+YalAsKvHORFT4jTa2rd0AsdxXW2aRbIQ8Mg7MZNcgLaL240uFG1zkWvvvLePfcakcpmcxRPcKfo1yPH9JsFr9w1z94LlxjXMI6VSbxdKVMg3W304uhRz75+kKrCt5am9kQ92qeUSOPcCAwc7GQZGolFqgkyH3hijcMFJRWN3ZgpgnxjBZkmlAERpRPyTIyiFvSNg0MbfP+Ovgha4bohOwxChCJtavDW9F2H9WHuSvVjjDuLnVn5tIhqjBkIv+qzBO3+5mWJKtxREWenqq2u64L+Wy3KsDzdQ9ihAgMBAAECggEAJTCrWfVKnATnZQmSqjwG7ZQTsmp73I8wScaz3C4srDLmBATT1crc05DtdTH99Pq8Acx1E32kc7TYhVx/AwlgQifVme3Kx7erLDVpp0ijhpqln5tuJBDz0E4V3s5yKBmnMDlaxrj/hoI0/vHV0xz9XEmbCAKthDZXb+tmvZ0dLwQKkg/J8pE+ZV2IDVH2DgB0L1TaHGRh8FGkAgSP6HN3sfLam/AFVoT0kTzzelVU3KDWcFxNPeKuGn6Gd+uVqS13DbprY2wEMC89DUU36fwiy6PlfQN3yg/NKttes+GzgI0va9sU/QwhpodXbauI+dwDFag+Eqr560LYkHWEjILRmQKBgQDKzFTI04qMNWufFUTjZQES6wh0gHPPaUbPAm8/UVl/wcuuyY1WTWBDaffr2hhIab35gRfh9W1JqaZrk+m1Sa8LKx4mEAHYkbPvJgeK6m3Uaau4xJIwP4GeHuBcAyilCpTNeKXeP7bxZ0d9Y8ru82Zxw30iVTVBwLM+Tb2lQPnZ5wKBgQCqHe3GEGkEEBQHAxProUHh18R+B9CBdYSZZRmIvkReXP1VAXsSLfitdmKQ6i6s0r0iS5KEbRTYpkDCfVOg8RPa2+QsvbEDDXo1MlnI2PaShSdORxCaJVI4REbdMQ5J/fpo2SHg2jiTN1O/HJXRmmfE+kwCQ7NqZifWwXRnZki4NwKBgQCLrnmnaa1ALXtXM3sjdOpscV59gAxEjCqtYuvlHM8cZAs69LBZBSqMxGxzEuEu30ZumDAu/rCr0CJEbrjGmV3rv2MgrF3ZIWJiEjuXvyiu6anRtfNLMDLDCllWhwZzxvn/HF6C2jfTxmNDRnz8YMHrEc8a2r238FaFT16UeFCfeQKBgBLVrXW4a2gfv5fnJ1V3TSwMD51EkDlFIaE6KFGTf05TTVkUCORCYr4R1WfmBbTswDQD2fz/dsdl4NWnupKfHmuk3OZ3Ohn0bAtnv7kVDHe8dlWcWKI4b5n7NT1YKRTYIdlp8O5MOudRwNvv9kZ2qfaNH81AYaTuGosUcCbilDqRAoGBAJyN8R2Rse4b64AI5SYQGw+ViCQhgoBN8ZXhIdC/UTpfMIKNB0Z+EakrhclFgwaMt0dyLaF1rfdxsXZiwUYWNX9EsFResZERYuulblPGaWiYhrRTRLfE5eixN9PG6HeEIkLHxFE4izEvz4Bi0HbzG4sJJnsXGDt/XqpJFlODXJfe";


    @Override
    protected ConnectionFactory<?> createConnectionFactory() {
        return new AlipayConnectionFactory("alipay", APPID, SECRET_KEY);
    }
}
